Skip to content

[pull] main from m-bain:main#59

Merged
pull[bot] merged 2 commits intoAsofwar:mainfrom
m-bain:main
Feb 8, 2026
Merged

[pull] main from m-bain:main#59
pull[bot] merged 2 commits intoAsofwar:mainfrom
m-bain:main

Conversation

@pull
Copy link

@pull pull bot commented Feb 8, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Mr-Neutr0n and others added 2 commits February 7, 2026 12:55
Replace O(n*m) pandas operations with O(n log m) interval tree queries
for speaker assignment, where n = words/segments and m = diarization segments.

Performance improvement:
- 7-minute video (1185 words, 147 segments): 73.9s -> 0.32s (228x faster)
- 3-hour podcast: Minutes of processing -> Seconds

Changes:
- Add IntervalTree class using sorted array + binary search
- Refactor assign_word_speakers to use interval tree for overlap queries
- Maintain backward compatibility with same function signature
- Identical output to original implementation

The interval tree uses numpy arrays for efficient storage and binary search
(np.searchsorted) for O(log n) candidate finding, then filters candidates
for actual overlaps.

Fixes #1335
…ssignment

Optimize assign_word_speakers with interval tree for 228x speedup
@pull pull bot locked and limited conversation to collaborators Feb 8, 2026
@pull pull bot added the ⤵️ pull label Feb 8, 2026
@pull pull bot merged commit 66ada29 into Asofwar:main Feb 8, 2026
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants